************************************
*DO-FILE UKRAINE WHAT IS PEACE

*Lesley-Ann Daniels and Oleksii Polegkyi

*International Negotiations

************************************


*DESCRIPTIVES
***************************************
*Figure 2
*for control group version one (grouped by category and then descending by frequency)
graph hbar (mean) p_end_war_bi p_security_bi p_victory_bi p_territory_bi p_destruct_bi p_sovereign_bi p_societal_bi p_account_bi p_inner_bi p_personal_bi  if exp5prime == 1, percent blabel(name, position(base)) legend(off) 

*Figure 3
*Figure 3 of only control group
graph hbar (mean) p_military_bi p_sociopol_bi p_emotional_bi if exp5prime == 1, percent blabel(name, position(base)) legend(off) 




*EXPERIMENTAL ANALYSIS
****************************************

*convert DV to out of 100
replace p_military_bi = 100*p_military_bi
replace p_sociopol_bi = 100*p_sociopol_bi
replace p_emotional_bi = 100*p_emotional_bi

replace p_end_war_bi = 100*p_end_war_bi
replace p_security_bi = 100*p_security_bi
replace p_victory_bi = 100*p_victory_bi
replace p_territory_bi = 100*p_territory_bi
replace p_destruct_bi = 100*p_destruct_bi
replace p_sovereign_bi = 100*p_sovereign_bi
replace p_account_bi = 100*p_account_bi
replace p_inner_bi = 100*p_inner_bi
replace p_personal_bi = 100*p_personal_bi

*Figure 4: Military Peace
reg p_military_bi i.exp5prime female ageband i.langchosen i.reg_pre urban ed_4c [pweight = wt]
margins i.exp5prime, plot(recast(scatter) ytitle(Military Peace percent, margin(small)) xtitle("") graphregion(fcolor(white)) plotregion(margin(vlarge)) )


*Table 1: Threat mechanism
eststo, title("Military"): quietly reg p_military_bi threat i.exp5prime female ageband i.langchosen i.reg_pre  urban ed_4c [pweight = wt] 
eststo, title("Socio-political"): quietly reg p_sociopol_bi threat i.exp5prime female ageband i.langchosen i.reg_pre  urban ed_4c [pweight = wt]
eststo, title("Personal"): quietly reg p_emotional_bi threat i.exp5prime female ageband i.langchosen i.reg_pre urban ed_4c [pweight = wt]
estout, cells(b(star  fmt(%9.3f)) se(par fmt(2))) label varlabels(_cons Constant) title(NI Polarization) stats(N r2, label(Observations RSquared)) starlevels(* 0.05 ** 0.01 *** 0.001)
eststo clear


*Figure 5: Socio-political peace
reg p_sociopol_bi i.exp5prime female ageband i.langchosen i.reg_pre urban ed_4c [pweight = wt]
margins i.exp5prime, plot(recast(scatter) ytitle(Socio-political Peace percent, margin(small)) xtitle("") graphregion(fcolor(white)) plotregion(margin(vlarge)) )


*Table 2_ Trust in Zelensky mechanism
eststo, title("Military"): quietly reg p_military_bi trust_zel i.exp5prime female ageband i.langchosen i.reg_pre  urban ed_4c [pweight = wt] 
eststo, title("Socio-political"): quietly reg p_sociopol_bi trust_zel i.exp5prime female ageband i.langchosen i.reg_pre  urban ed_4c [pweight = wt]
eststo, title("Personal"): quietly reg p_emotional_bi trust_zel i.exp5prime female ageband i.langchosen i.reg_pre urban ed_4c [pweight = wt]
estout, cells(b(star  fmt(%9.3f)) se(par fmt(2))) label varlabels(_cons Constant) title(NI Polarization) stats(N r2, label(Observations RSquared)) starlevels(* 0.05 ** 0.01 *** 0.001)
eststo clear


*Personal peace
reg p_emotional_bi i.exp5prime female ageband i.langchosen i.reg_pre urban ed_4c 
margins i.exp5prime, plot(recast(scatter) ytitle(Personal Peace percent, margin(small)) xtitle("") graphregion(fcolor(white)) plotregion(margin(vlarge)) )


**LIST EXPERIMENT

* add the kict package 
*citation
* Tsai, C. 2019.  Statistical analysis of the item-count technique using Stata.  Stata Journal 19: 390-434.


*diagnostics - treatment randomisation
*test for differences between short- and long-list respondents on key variables. If there is no significant differences, then this indicates an effective randomisation (there are no sig differences).

*for continuous variables
ttest age_rs, by(exp5list)
ttest urban, by(exp5list)

*for categorical variables
tab female exp5list, chi2
tab langchosen exp5list, chi2

*Table 3: Results of list experiment
*all primes
kict ls itemcount_con i.exp5prime female ageband i.langchosen i.reg_pre urban ed_4c, nnonkey(3) condition(exp5list) estimator(linear)
*threat
kict ls itemcount_con threat i.exp5prime female ageband i.langchosen i.reg_pre urban ed_4c, nnonkey(3) condition(exp5list) estimator(linear)
*trust in Zelensky
kict ls itemcount_con trust_zel i.exp5prime female ageband i.langchosen i.reg_pre urban ed_4c, nnonkey(3) condition(exp5list) estimator(linear)



*APPENDIX

*DESCRIPTIVES

sum p_military_bi p_sociopol_bi p_emotional_bi p_end_war_bi p_security_bi p_victory_bi p_territory_bi p_destruct_bi p_sovereign_bi p_societal_bi p_account_bi p_inner_bi p_personal_bi i.exp5prime i.female i.ageband i.langchosen i.reg_pre i.urban i.ed_4c threat trust_zel


*EXPERIMENTAL ANALYSIS

*Figure A1: end war 
reg p_end_war_bi i.exp5prime female ageband i.langchosen i.reg_pre urban ed_4c [pweight = wt]
margins i.exp5prime, plot(recast(scatter) ytitle(End War percent, margin(small)) xtitle("") graphregion(fcolor(white)) plotregion(margin(vlarge)) )

*security guarantees 
reg p_security_bi i.exp5prime female ageband i.langchosen i.reg_pre urban ed_4c [pweight = wt]
margins i.exp5prime, plot(recast(scatter) ytitle(Security, margin(small)) xtitle("") graphregion(fcolor(white)) plotregion(margin(vlarge)) )

*victory 
reg p_victory_bi i.exp5prime female ageband i.langchosen i.reg_pre urban ed_4c [pweight = wt]
margins i.exp5prime, plot(recast(scatter) ytitle(Peace as Victory, margin(small)) xtitle("") graphregion(fcolor(white)) plotregion(margin(vlarge)) )

*territory 
reg p_territory_bi i.exp5prime female ageband i.langchosen i.reg_pre urban ed_4c [pweight = wt]
margins i.exp5prime, plot(recast(scatter) ytitle(Peace as Territory percent, margin(small)) xtitle("") graphregion(fcolor(white)) plotregion(margin(vlarge)) )

*destruction of Russia 
reg p_destruct_bi i.exp5prime female ageband i.langchosen i.reg_pre urban ed_4c [pweight = wt]
margins i.exp5prime, plot(recast(scatter) ytitle(Destroy Russia percent, margin(small)) xtitle("") graphregion(fcolor(white)) plotregion(margin(vlarge)) )


*sovereignty for Ukraine 
reg p_sovereign_bi i.exp5prime female ageband i.langchosen i.reg_pre urban ed_4c [pweight = wt]
margins i.exp5prime, plot(recast(scatter) ytitle(Sovereignty, margin(small)) xtitle("") graphregion(fcolor(white)) plotregion(margin(vlarge)) )

*reforms to society 
reg p_societal_bi i.exp5prime female ageband i.langchosen i.reg_pre urban ed_4c [pweight = wt]
margins i.exp5prime, plot(recast(scatter) ytitle(Societal Peace percent, margin(small)) xtitle("") graphregion(fcolor(white)) plotregion(margin(vlarge)) )

*justice - mechanism could be punishment 
reg p_account_bi i.exp5prime female ageband i.langchosen i.reg_pre urban ed_4c [pweight = wt]
margins i.exp5prime, plot(recast(scatter) ytitle(Accountability, margin(small)) xtitle("") graphregion(fcolor(white)) plotregion(margin(vlarge)) )


*inner peace 
reg p_inner_bi i.exp5prime female ageband i.langchosen i.reg_pre urban ed_4c [pweight = wt]
margins i.exp5prime, plot(recast(scatter) ytitle(Inner Peace percent, margin(small)) xtitle("") graphregion(fcolor(white)) plotregion(margin(vlarge)) )

*lived
reg p_personal_bi i.exp5prime female ageband i.langchosen i.reg_pre urban ed_4c [pweight = wt]
margins i.exp5prime, plot(recast(scatter) ytitle(Lived Peace percent, margin(small)) xtitle("") graphregion(fcolor(white)) plotregion(margin(vlarge)) )

